//
// Created by denglibin on 2019/12/24 0024.
//
// 杨辉三角

#include <stdio.h>
#define N 10
/**
 * 打印杨辉三角
 */
void show()
{
    int arr[N][N] = {0};
    for (int i = 0; i < N; i++)
    {
        for (int j = 0; j <= i; j++)
        {
            if (j == 0 || j == i)
            {
                arr[i][j] = 1;
            }
            else
            {
                arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
            }
            if (arr[i][j] != 0)
            {
                printf("%d", arr[i][j]);
            }
        }
        printf("\n");
    }
}
int main24()
{
    show();
    return 0;
}